Nesting Depth of Operators in Graph Database Queries: Expressiveness vs. Evaluation Complexity
نویسندگان
چکیده
Designing query languages for graph structured data is an active field of research, where expressiveness and efficient algorithms for query evaluation are conflicting goals. To better handle dynamically changing data, recent work has been done on designing query languages that can compare values stored in the graph database, without hard coding the values in the query. The main idea is to allow variables in the query and bind the variables to values when evaluating the query. For query languages that bind variables only once, query evaluation is usually NPcomplete. There are query languages that allow binding inside the scope of Kleene star operators, which can themselves be in the scope of bindings and so on. Uncontrolled nesting of binding and iteration within one another results in query evaluation being PSPACE-complete. We define a way to syntactically control the nesting depth of iterated bindings, and study how this affects expressiveness and efficiency of query evaluation. The result is an infinite, syntactically defined hierarchy of expressions. We prove that the corresponding language hierarchy is strict. Given an expression in the hierarchy, we prove that it is undecidable to check if there is a language equivalent expression at lower levels. We prove that evaluating a query based on an expression at level i can be done in level i of the polynomial time hierarchy. Satisfiability of quantified Boolean formulas can be reduced to query evaluation; we study the relationship between alternations in Boolean quantifiers and the depth of nesting of iterated bindings. 1998 ACM Subject Classification F.1.3 Complexity measures and classes: Complexity hierarchies, F.4.3 Formal languages: Classes defined by grammars or automata, H.2.3 Languages: Query languages
منابع مشابه
nSPARQL: A Navigational Language for RDF
Navigational features have been largely recognized as fundamental for graph database query languages. This fact has motivated several authors to propose RDF query languages with navigational capabilities. In particular, we have argued in a previous paper that nested regular expressions are appropriate to navigate RDF data, and we have proposed the nSPARQL query language for RDF, that uses neste...
متن کاملnSPARQL : A Navigational Language for RDF 1
Navigational features have been largely recognized as fundamental for graph database query languages. This fact has motivated several authors to propose RDF query languages with navigational capabilities. In this paper, we propose the query language nSPARQL that uses nested regular expressions to navigate RDF data. We study some of the fundamental properties of nSPARQL and nested regular expres...
متن کاملQuery Languages for Bags and Aggregate Functions
Theoretical foundations for querying databases based on bags are studied in this paper. We fully determine the strength of many polynomial-time bag operators relative to an ambient query language. Then we obtain BQL, a query language for bags, by picking the strongest combination of these operators. The relationship between the nested relational algebra and various fragments of BQL is investiga...
متن کاملNested Concept Graphs: Applications for Databases and Mathematical Foundations
While the basic idea of using Conceptual Graphs as query interface to relational databases has already been stated very early in [Sow84], no approach so far has covered the full expressiveness of modern database query languages. Especially negation and the so-called aggregating functions have not been treated. In this paper, we present Nested Concept Graphs with Cuts which extend the syntactica...
متن کاملOn the expressiveness of linear-constraint query languages for spatial databases
The linear database model, in which semi-linear sets are the only geometric objects, has been identi7ed as suitable for spatial database applications from both modeling expressiveness as query e8ciency considerations. For querying linear databases, the language FO+linear has been proposed. In this paper, we examine the expressiveness of this language. First, we present a list of general queries...
متن کامل